/**
 * Electron.java
 */
package com.prs.crm.domain.document.electron;

import java.util.Date;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

import com.prs.crm.domain.Attachment;
import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.document.rule.Rule;
import com.prs.crm.domain.hr.Person;
import com.prs.crm.domain.sys.FileTypeMaintain;

/**
 * @author ZhuDongMei
 * @E-mail:1223984339@qq.com
 * @qq:1223984339
 * @version 创建时间：2011-3-16 上午11:12:28 简单说明
 */
@Entity
@Table(name="document_electron")
public class Electron extends BaseEntity {

	/**
	 * 电子期刊
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
    private Integer id;
	private String name;
	private String descript;
    private String keyWords;
    private String size;
    private Integer count;
    private Date time;
    private String updateSet;
    @ManyToOne(cascade=CascadeType.ALL)
	private Electron parent;
    @OneToMany(mappedBy="parent",cascade=CascadeType.ALL)
	private Set<Electron> childs;
	private String type;
	private String control;
	private String controlId;
	private String person;
	private String personId;
	private String visit;
	private String visitId;
	@ManyToOne(fetch=FetchType.LAZY)
	@Cascade({org.hibernate.annotations.CascadeType.ALL,org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
	private Attachment attach;
	@Column(name="document_file")
	private String document_file;
	@ManyToOne
	private FileTypeMaintain fileTypeMaintain;
	private String appiontPerson;//指定人员
	private String appiontPersonId;//指定人员Id
	
	/**
	 * 1，可以修改 2不能修改
	 */
	private Integer upState;
	/**
	 * 1，为显示   2，不显示
	 */
	private Integer viState;
	@ManyToOne
	private Person upPerson;
	private Integer delState;
	public Integer getDelState() {
		return delState;
	}
	public void setDelState(Integer delState) {
		this.delState = delState;
	}
	public String getAppiontPerson() {
		return appiontPerson;
	}
	public void setAppiontPerson(String appiontPerson) {
		this.appiontPerson = appiontPerson;
	}
	public String getAppiontPersonId() {
		return appiontPersonId;
	}
	public void setAppiontPersonId(String appiontPersonId) {
		this.appiontPersonId = appiontPersonId;
	}
	public Integer getUpState() {
		return upState;
	}
	public void setUpState(Integer upState) {
		this.upState = upState;
	}
	public Integer getViState() {
		return viState;
	}
	public void setViState(Integer viState) {
		this.viState = viState;
	}
	public Person getUpPerson() {
		return upPerson;
	}
	public void setUpPerson(Person upPerson) {
		this.upPerson = upPerson;
	}
	public FileTypeMaintain getFileTypeMaintain() {
		return fileTypeMaintain;
	}
	public void setFileTypeMaintain(FileTypeMaintain fileTypeMaintain) {
		this.fileTypeMaintain = fileTypeMaintain;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDescript() {
		return descript;
	}
	public void setDescript(String descript) {
		this.descript = descript;
	}
	public String getKeyWords() {
		return keyWords;
	}
	public void setKeyWords(String keyWords) {
		this.keyWords = keyWords;
	}
	public String getSize() {
		return size;
	}
	public void setSize(String size) {
		this.size = size;
	}
	public Integer getCount() {
		return count;
	}
	public void setCount(Integer count) {
		this.count = count;
	}
	public Date getTime() {
		return time;
	}
	public void setTime(Date time) {
		this.time = time;
	}
	public String getUpdateSet() {
		return updateSet;
	}
	public void setUpdateSet(String updateSet) {
		this.updateSet = updateSet;
	}
	public Electron getParent() {
		return parent;
	}
	public void setParent(Electron parent) {
		this.parent = parent;
	}
	public Set<Electron> getChilds() {
		return childs;
	}
	public void setChilds(Set<Electron> childs) {
		this.childs = childs;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getControl() {
		return control;
	}
	public void setControl(String control) {
		this.control = control;
	}
	public String getControlId() {
		return controlId;
	}
	public void setControlId(String controlId) {
		this.controlId = controlId;
	}
	public String getPerson() {
		return person;
	}
	public void setPerson(String person) {
		this.person = person;
	}
	public String getPersonId() {
		return personId;
	}
	public void setPersonId(String personId) {
		this.personId = personId;
	}
	public String getVisit() {
		return visit;
	}
	public void setVisit(String visit) {
		this.visit = visit;
	}
	public String getVisitId() {
		return visitId;
	}
	public void setVisitId(String visitId) {
		this.visitId = visitId;
	}
	public Attachment getAttach() {
		return attach;
	}
	public void setAttach(Attachment attach) {
		this.attach = attach;
	}
	public String getDocument_file() {
		return document_file;
	}
	public void setDocument_file(String documentFile) {
		document_file = documentFile;
	}
}
